package com.ruoyi.system.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 销售明细对象 order_item
 * 
 * @author ruoyi
 * @date 2025-10-09
 */
public class OrderItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键（自增） */
    private Long id;

    /** 关联销售单id（外键，销售单删则明细删） */
    @Excel(name = "关联销售单id", readConverterExp = "外=键，销售单删则明细删")
    private Long orderId;

    /** 关联商品id（外键） */
    @Excel(name = "关联商品id", readConverterExp = "外=键")
    private Long productId;

    /** 销售数量 */
    @Excel(name = "销售数量")
    private Long quantity;

    /** 销售单价（含折扣） */
    @Excel(name = "销售单价", readConverterExp = "含=折扣")
    private BigDecimal sellingPrice;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }

    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }

    public void setQuantity(Long quantity) 
    {
        this.quantity = quantity;
    }

    public Long getQuantity() 
    {
        return quantity;
    }

    public void setSellingPrice(BigDecimal sellingPrice) 
    {
        this.sellingPrice = sellingPrice;
    }

    public BigDecimal getSellingPrice() 
    {
        return sellingPrice;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderId", getOrderId())
            .append("productId", getProductId())
            .append("quantity", getQuantity())
            .append("sellingPrice", getSellingPrice())
            .toString();
    }
}
